<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>{$title}</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1"/>
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no,viewport-fit=cover">
    <meta itemprop="name" content="{$title}">
    <meta itemprop="description" content="{$share_introduction}">
    <meta itemprop="image" content="{$share_img}">
    {if $data.status == 0}
    <link href="{$oss}web/invitate_input_record/css/mui.min.css" rel="stylesheet"/>
    <link href="{$oss}web/invitate_input_record/css/mui.picker.min.css" rel="stylesheet"/>
    {/if}
    <link rel="stylesheet" href="/static/vip/css/common.css?v=2019.11.08">
    <link href="/static/invitate_input_record/css/invitate_input_record.css?v=12.03" rel="stylesheet"/>
</head>
<body>
<div class="container">
    <!--顶部图片-->
    <img class="header_img" src="{$oss}web/invitate_input_record/images/header.png" style="{$data.status == 0 ?'':'display: none;'}">
    <div id="tab-2" class="wrapper_content">
        <!--输入内容部分-->
        {if $data.status == 0}
        <div class="content_container">
            <img class="user_img" onerror="onerror=null;src='{$oss}/avatar_default_2.png'"
                 src="{$data.record.avatar}">
            <form action="##" onsubmit="return false" class="form" method="post" id="form">
                <div class="item_con">
                    <div class="title">昵称</div>
                    <div class="item_right_con">
                        <input class="input_con" type="text" id="name" name="name" value="{$data.record.name}">
                    </div>
                </div>
                <div class="item_con">
                    <div class="title">性别选择</div>
                    <div class="sex_con">
                        <div id="sex_male" class="sex {$data.record.sex ==1 ?'sex_selected':''}" onclick="actionSex(1)">男</div>
                        <div id="sex_female" class="sex sex_last {$data.record.sex ==2 ?'sex_selected':''}" onclick="actionSex(2)">女</div>
                    </div>
                </div>
                <div class="item_con">
                    <div class="title">出生时间</div>
                    <div class="item_right_con">
                        <input class="input_con" id="timeResult"
                               data-options="{&quot;value&quot;:&quot;{$data.record.year==''?'1995-01-01 00:00':$data.record.year.'-'.$data.record.month.'-'.$data.record.day.' '.$data.record.hour.':'.$data.record.minute}&quot;,&quot;beginYear&quot;:1900,&quot;endYear&quot;:2099}"
                               name="birth_time" placeholder="出生时间（公历）" type="text"
                               value="{$data.record.year==''?'':$data.record.year.'-'.$data.record.month.'-'.$data.record.day.' '.$data.record.hour.':'.$data.record.minute}"
                               readonly="true"
                               unselectable="on">
                        <div class="arrow"></div>
                    </div>
                </div>
                <!--todo 传过去的地点-->
                <div class="item_con">
                    <div class="title">出生地点</div>
                    <div class="item_right_con" id='showCityPickerBirth'>
                        <input class="input_con" id='cityResultBirth' type="text" name="birth_place" placeholder=""
                               value="{$data.record.birth_country==''?'':$data.record.birth_country.'-'.$data.record.birth_province.'-'.$data.record.birth_city}"
                               readonly="true"
                               unselectable="on">
                        <div class="arrow"></div>
                    </div>

                </div>

                <div class="item_con item_con_without_boder_bottom">
                    <div class="title">现居城市</div>
                    <div class="item_right_con" id='showCityPickerNow'>
                        <input class="input_con" id='cityResultNow' type="text" name="birth_place" placeholder=""
                               value="{$data.record.live_country==''?'':$data.record.live_country.'-'.$data.record.live_province.'-'.$data.record.live_city}"
                               readonly="true"
                               unselectable="on">
                        <div class="arrow"></div>
                    </div>
                </div>

                <input style="display:none;" type="text" id="is_user_have_record" name="is_user_have_record"
                       value="{$data.is_user_have_record}">
                <input style="display:none;" type="text" id="timestamp" name="timestamp" value="{$data.timestamp}">
                <input style="display:none;" type="text" id="share_to" name="share_to" value="{$data.share_to}">
                <input style="display:none;" type="text" id="unionid" name="unionid"
                       value="{$data.unionid}">
                <input style="display:none;" type="text" id="inviter_name" name="inviter_name" value="{$data.inviter_name}">

                <input style="display:none;" type="text" id="avatar" name="avatar" value="{$data.record.avatar}">
                <input style="display:none;" type="text" id="uid" name="uid" value="{$data.uid}">
                <input style="display:none;" type="text" id="sex" name="sex" value="{$data.record.sex}">

                <input style="display:none;" type="text" id="year" name="year" value="{$data.record.year}">
                <input style="display:none;" type="text" id="month" name="month" value="{$data.record.month}">
                <input style="display:none;" type="text" id="day" name="day" value="{$data.record.day}">
                <input style="display:none;" type="text" id="hour" name="hour" value="{$data.record.hour}">
                <input style="display:none;" type="text" id="minute" name="minute" value="{$data.record.minute}">

                <input style="display:none;" type="text" id="birth_country" name="birth_country" value="{$data.record.birth_country}">
                <input style="display:none;" type="text" id="birth_province" name="birth_province" value="{$data.record.birth_province}">
                <input style="display:none;" type="text" id="birth_city" name="birth_city" value="{$data.record.birth_city}">

                <input style="display:none;" type="text" id="live_country" name="live_country" value="{$data.record.live_country}">
                <input style="display:none;" type="text" id="live_province" name="live_province" value="{$data.record.live_province}">
                <input style="display:none;" type="text" id="live_city" name="live_city" value="{$data.record.live_city}">

                <input style="display:none;" type="text" id="long_deg" name="long_deg" value="{$data.record.long_deg}">
                <input style="display:none;" type="text" id="long_min" name="long_min" value="{$data.record.long_min}">
                <input style="display:none;" type="text" id="ew" name="ew" value="{$data.record.ew}">
                <input style="display:none;" type="text" id="lat_deg" name="lat_deg" value="{$data.record.lat_deg}">
                <input style="display:none;" type="text" id="lat_min" name="lat_min" value="{$data.record.lat_min}">
                <input style="display:none;" type="text" id="ns" name="ns" value="{$data.record.ns}">

            </form>
        </div>
        <div class="input_hint">您所填写的信息会被对方可见，请知悉</div>
        <div class="btn_ok" onclick="checkForm()">完成</div>
        {/if}
        <div class="result_con" style="display: none;">
            <img class="img_left" src="{$oss}web/invitate_input_record/images/result_ok.png">
            <div class="right_con">
                <div class="title">{$data.status==1?'已填写！':'提交成功！'}</div>
                <div class="des">{$data.status==1?'如需修改请好友再次发送邀请':($data.inviter_name!=''?$data.inviter_name:'').'已收到你的信息'}</div>

            </div>
        </div>
        <div class="result_con_self" style="display: none;">
            <div>邀请更多朋友</div>
            <div>就能获得更多合盘结果</div>
        </div>

        <div class="common_bottom_con" style="{$data.status == 0 ?'':'display: none;'}">
            <div class="first_con">
                <div class="line left"></div>
                <div class="des">想查看自己的详细星盘解读？</div>
                <div class="line right"></div>
            </div>
            <div class="second_con">下载“准了”app</div>
            <div class="btn_download">立即下载</div>
        </div>

    </div>
</div>
<div id="shadow" class="shadow"></div>
<div id="loading">
    <img src="{$oss}web/invitate_input_record/images/loading.gif" alt="">
</div>

<script>
    var status = '{$data.status}';
    var is_test = '{$is_test}';
    var share_title = '{$share_title}';
    var share_introduction = '{$share_introduction}';
    var share_img = '{$share_img}';
    var signPackage = JSON.parse('{:json_encode($signPackage)}');
    var record = JSON.parse('{:json_encode($data.record)}');
    var is_user_have_record = '{$data.is_user_have_record}';
</script>

{if $data.status == 0}
<script src="{$oss}web/invitate_input_record/js/mui.min.js"></script>
<script src="{$oss}web/invitate_input_record/js/city.data-xzns.js"></script>
<script src="{$oss}web/invitate_input_record/js/mui.picker.min.js"></script>
<script src="{$oss}web/invitate_input_record/js/mui.poppicker.js"></script>
<script src="/static/invitate_input_record/js/time.place.js"></script>
{/if}
<script src="/static/jquery-3.1.1.min.js"></script>
{if $data.share_to ==1}
<script src="https://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
<script>

    //微信分享 配置
    wx.config({
        debug: false,
        appId: signPackage.appId,
        timestamp: signPackage.timestamp,
        nonceStr: signPackage.nonceStr,
        signature: signPackage.signature,
        jsApiList: ['onMenuShareTimeline', 'onMenuShareAppMessage']
    })
    ;
    //微信分享 配置
    wx.ready(function () {
        wx.onMenuShareAppMessage({
            title: share_title,
            desc: share_introduction,
            link: signPackage.url,
            imgUrl: share_img,
            type: 'link',
            dataUrl: '',
            success: function () {

            },
            cancel: function () {

            }
        });
        wx.onMenuShareTimeline({
            title: '{$share_title}',
            link: '{$signPackage.url}',
            imgUrl: '{$share_img}',
            success: function () {

            },
            cancel: function () {

            }
        });
    });
</script>
{/if}
<script src="/static/vip/js/common_statistics.js"></script>
<!--<script src="http://qzonestyle.gtimg.cn/qzone/qzact/common/share/share.js"></script>-->
<script src="/static/invitate_input_record/js/invitate_input_record.js?v=11.22.1"></script>
{include file="../apps/web/view/public/sensors.html" /}

</body>
</html>
